package org.jeecg.modules.door.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.basic.demo.bed.entity.LwgyBaseBed;
import org.jeecg.modules.door.entity.LwgyEglock;
import org.jeecg.modules.door.entity.LwgyEglockRoomUser;

import java.util.List;

/**
 * @Description: 门锁分组管理
 * @Author: jeecg-boot
 * @Date:   2022-06-15
 * @Version: V1.0
 */
public interface LwgyEglockMapper extends BaseMapper<LwgyEglock> {
    List<LwgyEglock> queryPageListCustom(Page<LwgyEglock> page, @Param(Constants.WRAPPER) QueryWrapper<LwgyEglock> queryWrapper);
    //获取房间中的学生
    List<LwgyEglockRoomUser>  selectStudentByRoom(String roomId);
    //获取房间所属分组中的用户
    List<LwgyEglockRoomUser>  selectGroupUserByRoom(String roomId);

    void updateDoorCodeByRoomId(LwgyEglock lwgyEglock);

    List<LwgyEglock> queryDoorList(LwgyEglock lwgyEglock);

}
